-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(hub): Move @sentry/hub
code to @sentry/core
#5823
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@sentry/hub
code to @sentry/core
6b15512
to
472f616
Compare
This comment was marked as outdated.
This comment was marked as outdated.
We merged in #5873, which prob requires a more tricky rebase. |
Should we be marking all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future readers: We'll save deleting @sentry/hub
for the next major version, this just sets us up to do further refactors to work toward truly platform agnostic packages.
Good idea! Let's do that. |
Since the exports in export { getCurrentHub as getCurrentHubCore } from '@sentry/core';
/**
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8
*/
const getCurrentHub = getCurrentHubCore;
export { getCurrentHub } |
Ok, I think this is now good to go. I couldn't mark |
@timfish, since they're classes, could you do import { Hub as CoreHub } from '@sentry/core';
/**
* @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8
*/
export class Hub extends CoreHub { }; ? |
It does leave me with a strange feeling that it is somehow exporting a different type to before but my logical side says that it's totally fine! 🙃 |
Can we move the tests in another PR? Let's try to get this released on Monday alongside the NextJS experimental flag switch |
Leaving the tests in hub was instrumental in ensuring that there were no breaking changes in Safe to move then now? |
Ahhh great point, then let's keep them until we do the actual deletion during the major. |
Closes #5665
This PR:
@sentry/hub
code files to@sentry/core
@sentry/hub
to a stub that re-exports the same types from@sentry/core
@sentry/hub
now only depends on@sentry/core
@sentry/hub
->@sentry/core
@sentry/hub
as a dependency from packages@sentry/hub
tests where they are for nowSurprisingly this results in a 159 byte increase in minified bundle size!
I've compared the type exports from
@sentry/hub
from before and after this PR and the exports match so it looks like this isn't a breaking change 😬